package com.weibo4j.api.req.status;

import java.util.Arrays;
import java.util.List;

import com.weibo4j.api.WeiboRequest;
import com.weibo4j.api.response.status.StatusStatResponse;
import com.weibo4j.api.util.RequestType;

public class StatusStatRequest extends WeiboRequest<StatusStatResponse> {
    
    private List<String> idList;

    public List<String> getIdList() {
        return idList;
    }

    public void setIdList(List<String> idList) {
        this.idList = idList;
    }
    
    public String getIds() {
        if (idList != null && !idList.isEmpty()) {
            String ids = Arrays.toString(idList.toArray(new String[idList.size()]));
            return ids.substring(1, ids.length() - 1);
        } else {
            return null;
        }
    }

    @Override
    public RequestType requestType() {
        return RequestType.GET;
    }

    @Override
    public String baseUrl() {
        return "https://api.weibo.com/2/statuses/count.json";
    }

    @Override
    public Class<StatusStatResponse> responseType() {
        return StatusStatResponse.class;
    }


}
